<div class="title">
	<span>View Appointment</span>
	<div class="clear">&nbsp;</div>
</div>

<div class="margin">
<?php flash(); // display flash data?>
<?php if($b->status == 'Pending'):?>
		<div class="msg notice"><span></span><h5>Pending</h5>This booking is still awaiting action.</div>
<?php elseif($b->status == 'Confirmed'):?>
		<div class="msg success"><span></span><h5>Confimred</h5>This booking has already been confirmed</div>
<?php elseif($b->status == 'Deny'):?>
		<div class="msg error"><span></span><h5>Denied</h5>This booking has been denied</div>
<?php endif;?>
<fieldset>
<legend>Customer Details</legend>
<div class="block"><strong>Firstname: </strong> <?php echo $b->cfname; ?></div>
<div class="block"><strong>Lastname: </strong> <?php echo $b->clname; ?></div>
<div class="block"><strong>Contact: </strong> <?php echo $b->ccontact; ?></div>
<div class="block"><strong>Email: </strong> <?php echo $b->cemail; ?></div>
</fieldset>

<fieldset>
<legend>Booking Details</legend>
<div class="block"><strong>Date Booked: </strong> <?php echo date('D M d Y g:i A', strtotime($b->created)) ?></div>
<div class="block"><strong>Stylist: </strong> <?php echo $b->sname.' '.$b->slname; ?></div>
<div class="block"><strong>Service: </strong> <?php echo $b->service; ?></div>
<div class="block"><strong>Schedule: </strong> <?php echo date('D M d', strtotime($b->adate)).' '.date('g:i A', strtotime($b->aps_time_from)).'-'.date('g:i A', strtotime($b->aps_time_to)); ?></div>
<div class="block"><strong>Customer Note: </strong> <br/>  <?php echo $b->customer_note; ?></div>
</fieldset>


<?php echo form_open('admin/view_booking/'.$bid);?>
<fieldset>
<legend>Booking Action</legend>
<div class="input-block">
<label>Action</label>
<?php echo $b->status;?>
<select name="status">
	<option value="Pending" <?php echo $b->status == 'Pending' ? 'selected="selected"' : '';?>>Pending</option>
	<option value="Confirmed" <?php echo $b->status == 'Confirmed' ? 'selected="selected"' : '';?>>Confirm</option>
	<option value="Deny" <?php echo $b->status == 'Deny' ? 'selected="selected"' : '';?>>Deny</option>
</select>

</div>

<div class="input-block">
	<label>Your Note: </label>
	<textarea name="admin_note"><?php echo $b->admin_note;?></textarea>
</div>

<input type="submit" value="Save" name="save" class="fbtn add" />
</fieldset>
<?php echo form_close();?>

<a href="<?php echo site_url('admin/booking_list/')?>" class="back-btn"><span>Back</span></a>

</div>